
window.addEventListener("apiready",function(){

 // // 调试
 // url = "wallet_withdraw_cash.html";
 // url = "wallet_bill.html";
 // url = "order_details.html";
 // url = "setting.html";
 // url = "user_info.html";
 // url = "order2.html";
 // url = "order2_detail.html";
 // url = "wallet.html";
 // url = "order_list2.html";
 // url = "coupon.html";
 // url = "order_create.html";
 // url = "login_phone.html";
 // url = "order_pay_success.html";
 // // url = "order_detail.html";
 //  api.openWin({
 //      name: "public",
 //      url: url,
 //      slidBackEnabled: false,
 //      softInputMode: "resize"
 //  });
 // return;
 // localdata.log("userinfo");

  // localdata.set("userinfo",{"birthday":"2009-11-20","country":"China","agent":null,"account_balance":0,"unionid":"opRTOvlImI79y3iijylyU4etTNV4","signature":null,"city":"Wenchang","jpushid":"offline","language":null,"remark":null,"subscribe_time":null,"area_id":"120102","wx_token":null,"password":null,"province":"Hainan","xappid":"wxdb4a18fe5731ee4a","sum_integral":999999999,"nickname":"倡","headimgurl":"https://wx.qlogo.cn/mmopen/vi_32/3SmSiaxrCV9sAwh6FG0anYMuRlIumYjnp0B0gDAUeI1mOJLjm1UicaSTM76COSAUXwWTeeKr0aOZcsxTBfBbIiaUQ/132","id":109798,"is_agent":null,"email":null,"membership_grade":null,"address":null,"subscribe":0,"openid":"o8HP25Yk7rAciDqRMZOS4SKxQgHA","sex":1,"groupid":null,"mobile":null,"un_subscribe_time":null,"uptime":null,"appid":null,"app_openid":"osLUVtyKyhndc_MyhyhGHGyiJnoc","info_state":2,"bind_phone":null,"login_token":"df2196987c7942ea8c813d3ebc36d267","username":"15248991871","city_id":"120100"});

	//  导航菜单
	open_menu(1);

	// 极光推送
	Jpush_Init();

	// 应用数据分析
	AnalysisApp();

	// ======================================== 公共事件  =============================================
  // 登录成功
  api.addEventListener({name:"evt_UserLogin"},function(ret,err){
  	// 关闭登录窗口
		// hhWin.shut("user_login",500);
  });

  // 用户退出
  api.addEventListener({name:"evt_UserLogout"},function(ret,err){
		localdata.del("userinfo");
		open_UserLogin();
  });
});
